import { handle } from '../../index'

const suffix = 'api'

// 查询所有分类
export const frontGetAllSysLabelsForQd = () => handle({
  url: `/${suffix}/front/getAllSysLabelsForQd`,
  method: 'get',
})

// 根据索引id获取索引信息级索引字段信息
export const frontGetIndexAndFieldInfo = (params: any) => handle({
  url: `/${suffix}/front/getIndexAndFieldInfo`,
  method: 'get',
  params
})

// 搜索记录
export const searchLogsGetKeyWordByUserId = (params: any) => handle({
  url: `/${suffix}/search-logs/getKeyWordByUserId`,
  method: 'get',
  params
})

// 档案主题
export const frontGetThemeByThemeId = (id: any) => handle({
  url: `/${suffix}/front/getThemeByThemeId/${id}`,
  method: 'get',
})

// 保存搜索记录
export const searchLogsSaveSearchLog = (params: any) => handle({
  url: `/${suffix}/search-logs/saveSearchLog`,
  method: 'post',
  params
})
